package erp.education.web.action.finance.master;

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ModelDriven;

import erp.education.client.finance.master.FeeGroupRequest;
import erp.education.server.beans.interfaces.finance.master.FeeGroupServiceI;
import erp.education.web.common.BaseAction;

public class FeeGroupAction extends BaseAction implements
		ModelDriven<FeeGroupRequest> {
	@Autowired
	FeeGroupRequest feeGroupRequest;
	@Autowired
	FeeGroupServiceI feeGroupService;

	public String feeGroups() throws Exception {

		this.result = feeGroupService.feeGroupLoadSevice(feeGroupRequest)
				.getResponseObject();
		getRequest().setAttribute("result", this.result.getResultList());

		return "feegroups";
	}

	public String saveUpdateFeeGroupDetails() throws Exception {

		this.result = feeGroupService
				.saveUpdateFeeGroupDetails(feeGroupRequest).getResponseObject();
		getRequest().setAttribute("result", this.result.getResultList());

		return "feegroups";
	}

	@Override
	public FeeGroupRequest getModel() {
		return this.feeGroupRequest;
	}
}
